<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div th:fragment="headAdm">
        <el-col :span="20">
            <el-menu default-active="1"  mode="horizontal" >
                <el-menu-item index="1" @click="goIndex()">首页</el-menu-item>
            </el-menu>
        </el-col>
        <el-col :span="4" >
            <div style="width:auto;display: flex;justify-content:space-between;">
                <p  th:if="${session.SPRING_SECURITY_CONTEXT}== null" style="color:black">
                    [
                    <a href="/api/public/goLogin" > 登录</a>
                    -
                    <a href="/api/public/goAddUser">注册</a>
                    ]
                </p>
                <div th:if="${session.SPRING_SECURITY_CONTEXT}!= null"
                     style="width:5%; line-height: 59px;">
                    <div style="padding-right:10%">
                        <el-dropdown placement="bottom-end" style="color: black" @command="userClick" >
                            <span th:text="${session.SPRING_SECURITY_CONTEXT.authentication.principal.name}"><i class="el-icon-arrow-down"></i></span>
                            <el-dropdown-menu >
                                <el-dropdown-item command="my">个人中心</el-dropdown-item>
                                <el-dropdown-item command="addBlog">快速发表</el-dropdown-item>
                                <el-dropdown-item command="loginOut">退出</el-dropdown-item>
                            </el-dropdown-menu>
                        </el-dropdown>
                    </div>
                </div>
            </div>
        </el-col>
    </div>
</body>
</html>